<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>Document</title>
</head>
<body>
	
	<script type="text/javascript">
	    var	name = 'abc';
	    var sex = '';

        switch(sex){
        	case '男':
                alert(name+'先生，您好');
                break;
            case  '女':
                alert(name+'女士，您好');
                break;

            default:  //默认
                alert('您好！');
                break;

        }



	</script>
</body>
</html>